package com.training;

/*	Visible to the package. the default. No modifiers are needed.
Visible to the class only (private).
Visible to the world (public).
Visible to the package and all subclasses (protected). */



class accessExample {

	private static String format="Kumar";
	//private static final String format="Kumar"; //Example for final variable
	public String getFormat() {
		return this.format;
	}
	public void setFormat(String format) {
		this.format = format;
	}
	public static void main(String args[]){

		System.out.println("Value is "+format);
		accessExample log=new accessExample();
		log.setFormat("Satheesh");
		log.getFormat();
		System.out.println("Value is "+format);
		System.out.println("Value from privateExample "+PrivateExample.format);
		System.out.println("Value is "+ProtectExample.pVariable);;
		// System.out.println("Value is "+ProtectExample.pVariable2);;
		

		
		PrivateExample pe = new PrivateExample();
		//pe.privatePrint();
		// Since privatePrint is private. It cant be able access here 
	}


}